<%@ page language="java" pageEncoding="UTF-8" isELIgnored="false" %>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %>
<HTML>
<HEAD>
    <meta http-equiv="Content-Language" content="zh-cn">
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <LINK href="${pageContext.request.contextPath}/css/Style1.css" type="text/css" rel="stylesheet">
    <link rel="stylesheet" href="${pageContext.request.contextPath}/css/bootstrap.min.css" type="text/css"/>
    <script src="${pageContext.request.contextPath}/js/jquery-2.1.4.min.js"
            type="text/javascript"></script>
    <script src="${pageContext.request.contextPath}/js/bootstrap-3.1.1.min.js"></script>
</HEAD>
<style>
    body {
        margin-top: 20px;
        margin: 0 auto;
    }

    .carousel-inner .item img {
        width: 100%;
        height: 300px;
    }

    .container .row div {
        /* position:relative;
        float:left; */
    }

    font {
        color: #3164af;
        font-size: 18px;
        font-weight: normal;
        padding: 0 10px;
    }

    form {
        width: 500px;
        overflow: hidden;
        margin: 50px auto;
    }

    div {
        line-height: 40px;
    }

    input {
        width: 250px;
        padding-left: 10px;
        height: 30px;
        line-height: 30px;
        color: #333;
        font-size: 14px;
        border: 1px solid #666;
        outline: none;
        margin-bottom: 10px;
        display: inline-block;

    }

    span {
        display: inline-block;
        float: left;
        width: 80px;
    }

    .submit {
        width: 120px;
        background: #666;
        color: #fff;
        margin-left: 40px;
        cursor: pointer;
    }
</style>
<body>

<h2>用户信息</h2>

<%--<form action="/admin/adminUpdate.do" method="post" class="form" onsubmit="return check(this)">--%>
<%--<input type="text" name="uid" value="${user.uid}" hidden="hidden">--%>
<%--<input type="text" name="page" value="${page}" hidden="hidden">--%>
<%--<div><span>姓名：</span><input type="text" name="name" value="${user.name}" id="name"  /><br /></div>--%>
<%--<div><span>用户名：</span><input type="text" name="username" value="${user.username}"  id="username"  /><br /></div>--%>
<%--<div><span>电话：</span><input type="text" name="telephone" value="${user.telephone}"  id="phone"  /><br /></div>--%>
<%--<div><span>密码：</span><input type="password" name="password" value="${user.password}" readonly  id="pwd1" /><br /></div>--%>
<%--<div><span>邮箱：</span><input type="text" name="email" value="${user.email}"  id="email"/><br /></div>--%>
<%--<div><span>激活状态：</span><input type="text" name="state" value="${user.state}"  id="state" /><br /></div>--%>
<%--<input type="submit" value="提交" class="submit" />--%>
<%--<input type="button" value="退出" onclick="checkout(${page})" class="submit" />--%>
<%--</form>--%>

<form:form action="${pageContext.request.contextPath}/admin/adminUpdate.do" method="post" commandName="user">
    <form:hidden path="uid"/>
    <input type="text" name="page" value="${page}" hidden="hidden">
    <div>
        <span>姓名：</span>
        <form:input path="name" /><br/></div>
    <div>
        <span>用户名：</span>
        <form:input path="username"/><br/></div>
    <div>
        <span>电话：</span>
        <form:input path="telephone"/><br/></div>
    <div>
        <span>密码：</span>
        <form:input path="password" /><br/></div>
    <div>
        <span>邮箱：</span>
        <form:input path="email"/><br/></div>
    <div>
        <span>激活状态：</span><form:input path="state"/>
        <br/></div>
    <input type="submit" value="提交" class="submit"/>
    <input type="button" value="退出" onclick="checkout(${page})" class="submit"/>
</form:form>
</body>

<script>
    function checkout(obj) {
        location.href = "${pageContext.request.contextPath}/admin/adminFindAllUser.do?page=" + obj;
    }
</script>
</HTML>